﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Time.IDAL
{
    public interface IEqAlarm_DAL
    {
        /// <summary>
        /// 执行SQL处理
        /// </summary>
        /// <param name="strSql">执行的SQL语句或者存储过程名</param>
        /// <param name="Option">参数数据</param> 
        /// <returns></returns>
        int ExecuteNonQuery(string strSql, string[,] Option);
        /// <summary>
        /// 获取数据集合
        /// </summary>
        /// <returns></returns>
        DataTable getData(string sqlStr);

        int ExecuteNonQuery(string DestBsType, string strSql, string[,] Option);
        /// <summary>
        /// 获取数据集合
        /// </summary>
        /// <returns></returns>
        DataTable getDataTable(string tableName);
        /// <summary>
        /// 根据表名和字段获取数据
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="field"></param>
        /// <returns></returns> 
        DataTable getDataTableByMap( string tableName, string field, string orderInfo = "MCGS_Time",string BSType="Sqlserver");
        DataTable getTableObj();
        /// <summary>
        /// 数据插入到test,不删除数据源
        /// </summary>
        /// <param name="objDt">数据表</param>
        /// <returns></returns>
        int MoveData(string TableName, DataTable objDt);
        int MoveDataByMap(string DestBsType, string STableName, string DTableName, DataTable objDt, string[] SourceFieldArr, string[] DestFieldArr);
        /// <summary>
        /// 自动转移后删除数据源
        /// </summary>
        /// <param name="TableName"></param>
        /// <param name="objDt"></param>
        /// <returns></returns>
        int MoveDataAndDelete(string TableName, DataTable objDt);
        int MoveDataMapAndDelete( string STableName, string DTableName, DataTable objDt, string[] SourceFieldArr, string[] DestFieldArr);

    }
}
